/*
 Template Name: vacayhome
 File Name: custom.js
 Author Name: ThemeVault
 Author URI: 
 License URI: license/
 */

$(document).ready(function () {


    $(window).scroll(function () {
        if ($(this).scrollTop() > 100) {
            $('#back-to-top').fadeIn();
        } else {
            $('#back-to-top').fadeOut();
        }
    });
    $('#back-to-top').click(function () {
        $("html, body").animate({scrollTop: 0}, 600);
        return false;
    });

    $('a').click(function(){
        // console.log($(this).attr("floor"));
        if($(this).attr("floor")){
            $("html, body").animate({scrollTop: $($(this).attr("floor")).offset().top-100},600);
        }
    });

});
